<br><br>
<U><h2>PLAN IV – EQUIPMENT SCHEDULE</h2></U>
<h2>Equipment</h2>
<?php $planList = Equipment::model()->getPlanTypeList();?>
<?php foreach($eqSchedule as $id):
    $item  =ContractEquipment::model()->find('equipmentid=:equipmentid and contractid = :contractid',
        array(
            'equipmentid'=>$id,
            'contractid'=>$contract->contractid
        )
    );
    $original = Equipment::model()->findByPK($item->equipmentid);
    $description = $original->description;

    if(isset($planList[$item->planid])){
        $plan = $planList[$item->planid];

    }else{
        $plan = 'Not Set';
    }
    /* @var $model EquipmentSchedule */
    $model = ContractEquipSchedule::model()->find('contractid=:contractid AND equipmentid=:equipmentid',array(':equipmentid'=>$id,':contractid'=>$contract->contractid));
    ?>
<?php if($model): ?>
<table cellspacing="0" cellpadding="3"  style="border: 1px solid black;">
    <tr>
        <th align="center" style="width:100px;background-color: #dddddd;border: 1px double black;">QSI Equip. No</th>
        <th align="center" style="width:60px;background-color: #dddddd;border: 1px double black;">QTY</th>
        <th align="left"  style="width:325px;background-color: #dddddd;border: 1px double black;">Description </th>
        <th align="center" style="width:75px;background-color: #dddddd;border: 1px double black;">Plan </th>
        <th align="right" style="width:75px;background-color: #dddddd;border: 1px double black;">Price </th>

    </tr>
    <tr>
    <td align="center"  ><?=$item->equipmentid ?></td>
    <td align="center"  ><?= $item->qty ?></td>
    <td align="left"  ><?= $description ?></td>
    <td align="center"  ><?=$plan ?></td>
    <td align="right"  ><?= $item->price ?></td>


</tr>
 </table>
<table border="1" width="635x;">
    <tr>
        <th>

        </th>
        <th align="center">Monday</th>
        <th align="center">Tuesday</th>
        <th align="center">Wednesday</th>
        <th align="center">Thursday</th>
        <th align="center">Friday</th>
        <th align="center" >Saturday</th>
        <th align="center" >Sunday</th>
    </tr>
    <tr>
        <td align="center">Start</td>
        <td align="center"><?=$model->MonStart ?></td>
        <td align="center"><?=$model->TueStart?></td>
        <td align="center"><?=$model->WedStart?></td>
        <td align="center"><?=$model->ThuStart?></td>
        <td align="center"><?=$model->FriStart?></td>
        <td align="center"><?=$model->SatStart?></td>
        <td align="center"><?=$model->SunStart?></td>
    </tr>
    <tr>
        <td align="center">End</td>
        <td align="center"><?=$model->MonEnd ?></td>
        <td align="center"><?=$model->TueEnd?></td>
        <td align="center"><?=$model->WedEnd?></td>
        <td align="center"><?=$model->ThuEnd?></td>
        <td align="center"> <?=$model->FriEnd?></td>
        <td align="center"><?=$model->SatEnd?></td>
        <td align="center"><?=$model->SunEnd?></td>
    </tr>

</table>
<?php endif;?>
<?php endforeach;?>
